import { Injectable } from "@angular/core";
import { TagData } from "../../../entity/tag-data.model";
import { FarmTotalTurbstatus } from "./farm-total-turbstatus";

/**
 * 风场数据模型
 * 
 * @export
 * @interface LimitedFarm
 */

@Injectable()
export class LimitedFarm {
  /**
   * 风场ID
   * 
   * @type {number}@memberof LimitedFarm
   */
  public farmId: number;
  public farmCode: string;
  public farmName: string;
  public farmCategory: string;
  public simpleCode: string;
  public capacity: number;
  public posx: number;
  public posy: number;
  public productionDate: string;
  public totalTurbine: number;
  /**
   * 风场日实时发电量
   * 
   * @type {RealtimeData}@memberof LimitedFarm
   */
  public powerDay: TagData;
  /**
   * 风场平均风速
   * 
   * @type {RealtimeData}@memberof LimitedFarm
   */
  public avgWindSpeed: TagData;
  /**
   * 风场有功功率合计
   * 
   * @type {RealtimeData}@memberof LimitedFarm
   */
  public totalPower: TagData;
  /**
   * 月发电量
   * 
   * @type {RealtimeData}@memberof LimitedFarm
   */
  public PowerMonth: TagData;
  /**
   * 年发电量
   * 
   * @type {RealtimeData}@memberof LimitedFarm
   */
  public PowerYear: TagData;
  /**
   * 风场通讯状态 
   * 
   * @type {RealtimeData}@memberof LimitedFarm
   */
  public communication: TagData;
  /**
   * 风机状态统计
   * 
   * @type {RealtimeData}@memberof LimitedFarm
   */
  public farmTotalTurbstatuies: FarmTotalTurbstatus[] = [];
  public farmTotalInverstatuies: FarmTotalTurbstatus[] = [];
  /**
   * 风场测点历史数据
   * 
   * @type {History[]}@memberof LimitedFarm
   */
  public histories:HistoryArray={};
    /**
   * 风机状态
   * 
   * @type {History[]}@memberof LimitedFarm
   */
  public subState:FarmTotalTurbstatus[]=[]
   /**
   * 辐射量
   * 
   * @type {History[]}@memberof LimitedFarm
   */
  public radiantQuantity: TagData;
  public Irradiation:TagData;
  public unShowName:boolean;
  constructor(){
   
  }
}

/**
 * 历史数据字典
 * 
 * @export
 * @interface HistoryArray
 */
export interface HistoryArray{
  [index:string]:History;
}

/**
 * 历史数据
 * //  例如
 * //  data[0][1] 对应time
 * //  data[0][2] 对应value
 * @export
 * @interface History
 */
export interface History{
  code:string;
  title:string;
  color:string;
  data:any[][];
}










// WEBPACK FOOTER //
// ./src/app/module/monitor/main/limited-farm.ts